﻿using System;
using System.Collections.Generic;

namespace Bilibili.Model.Dynamic
{
    public sealed class DynamicVideo
    {
        public long aid { get; set; }
        public List<EmojiDetails> emoji_details { get; set; }
        public string desc { get; set; }
        public string title { get; set; }
        private string _pic;
        public string pic
        {
            get { return _pic; }
            set { _pic = value + "@200w.jpg"; }
        }
        public string dynamic { get; set; }
        public double duration { get; set; }
        public string Duration
        {
            get
            {
                return TimeSpan.FromSeconds(duration).ToString();
            }
        }
        public string ctrl { get; set; }
        public DynamicVideo stat { get; set; }
        public long danmaku { get; set; }
        public string Danmaku
        {
            get
            {
                if (danmaku > 10000)
                    return ((double)danmaku / 10000).ToString("0.0") + "万";
                else
                    return danmaku.ToString();
            }
        }
        public long view { get; set; }
        public string View
        {
            get
            {
                if (view > 10000)
                    return ((double)view / 10000).ToString("0.0") + "万";
                else
                    return view.ToString();
            }
        }
        public DynamicVideo owner { get; set; }
        public long mid { get; set; }
        public string name { get; set; }
        public string face { get; set; }
    }
}